#include "Log.hpp"
#include "ThreadPool_1.hpp"
#include "Task.hpp"

using namespace LogModule;
using namespace ThreadPoolModule;
int main()
{
    Enable_Console_Log_Strategy();
    int count = 10;
    while (count)
    {
        // ThreadPool<task_t>::GetInstance()表示获取一个ThreadPool<task_t>类型的指针对象
        ThreadPool<task_t>::GetInstance()->Enqueue(Download);
        sleep(1);
        count--;
    }
    ThreadPool<task_t>::GetInstance()->Stop();
    ThreadPool<task_t>::GetInstance()->Join();
    return 0;
}